package com.zlzxm.sorting.ui.view.sortview2

import com.chad.library.adapter.base.BaseNodeAdapter
import com.chad.library.adapter.base.entity.node.BaseNode




/**
 *
 *CREATE BY zlzxm ON 2022/8/22
 *
 */
class AdapterNodeProduct:BaseNodeAdapter() {


    init {

        addFullSpanNodeProvider(RootNodeProvider())
        addNodeProvider(ProductProvider())
    }
    override fun getItemType(data: List<BaseNode>, position: Int): Int {
        val node = data[position]
        if (node is RootNode) {
            return 0
        } else if (node is SecondNode) {
            return 1
        }
        return -1
    }
}